package com.start.shejimoshi.gongchang.jiandangongshangmoshi;

public class FactoryDemo {

    public static void main(String[] args) {

//        Fruits fruits = Factory.getFruits("苹果");
//        if (null == fruits) {
//            System.out.println("生产不了您想要的水果");
//        }else {
//            fruits.get();
//        }
        Fruits fruits1 = Factory1.getFruits(Banana.class);
        System.out.println(fruits1.get());


    }
}